]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView/workspacesDisplay: Ignore emulated events
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 6 Jan 2021 19:38:44 +0000 (16:38 -0300)
committerMarge Bot <marge-bot@gnome.org>
Thu, 7 Jan 2021 14:04:03 +0000 (14:04 +0000)
When handling all scroll directions, it is imperative to ignore emulated
events. Otherwise we may get the wrong scroll direction, e.g. when natural
scrolling is enabled.

Ignore pointer emulated events in WorkspaceDisplay._onScroll().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1560>

js/ui/workspacesView.js

index 4a11f088892c2d98ccb141bdacbc6120aead43bd..1e8faf34902a552ce8604750e8db38106c7ff01d 100644 (file)
@@ -756,6 +756,9 @@ class WorkspacesDisplay extends St.Widget {
         if (!this._canScroll)
             return Clutter.EVENT_PROPAGATE;
 
+        if (event.is_pointer_emulated())
+            return Clutter.EVENT_PROPAGATE;
+
         let workspaceManager = global.workspace_manager;
         let activeWs = workspaceManager.get_active_workspace();
         let ws;